﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SiteServer.Plugin;
using Thingpower.SS.OSS.BackgroundPages;

namespace Thingpower.SS.OSS
{
    public class OSSPlugin : PluginBase
    {
        public const string PluginId = "Thingpower.SS.OSS";

        internal static OSSPlugin Instance { get; private set; }

        public override void Startup(IService service)
        {
            service
                .AddSystemMenu(new Menu
                {
                    Text = "存储插件管理",
                    Menus = new List<Menu>
                    {
                        new Menu
                        {
                            Text = "插件设置",
                            Href = $"BackgroundPages/{nameof(PageSettings)}.aspx"
                        },
                        new Menu
                        {
                            Text = "存储对象",
                            Href = $"BackgroundPages/{nameof(PageResources)}.aspx"
                        }
                    }
                })
                ;

            Instance = this;
        }
    }
}